From b8fa68109802c3c46abbe2f5e5314ffea5273298 Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Tue, 5 Aug 2025 03:05:53 +0000 Subject: [PATCH] adblock-fast: bugfixes: status & TLD check with unbound fixes: https://github.com/openwrt/packages/issues/27146 supercedes: https://github.com/openwrt/packages/pull/27159 Signed-off-by: Stan Grishin --- net/adblock-fast/Makefile | 2 +- net/adblock-fast/files/etc/init.d/adblock-fast | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/net/adblock-fast/Makefile b/net/adblock-fast/Makefile index fb13da8a22..39ac111928 100644 --- a/net/adblock-fast/Makefile +++ b/net/adblock-fast/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=adblock-fast PKG_VERSION:=1.1.4 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_MAINTAINER:=Stan Grishin PKG_LICENSE:=AGPL-3.0-or-later diff --git a/net/adblock-fast/files/etc/init.d/adblock-fast b/net/adblock-fast/files/etc/init.d/adblock-fast index e3e09a862c..9304585763 100755 --- a/net/adblock-fast/files/etc/init.d/adblock-fast +++ b/net/adblock-fast/files/etc/init.d/adblock-fast @@ -459,7 +459,7 @@ json() { 'get') case "$param" in 'errors'|'warnings') - json_select "$param" >/dev/null 2>&1 + json_select "$param" >/dev/null 2>&1 || return if [ -z "$value" ]; then json_get_keys i else @@ -1140,7 +1140,7 @@ resolver() { sanity) [ -n "$sanity_check" ] || return 0 output_dns "Sanity check for $dns TLDs " - if ! grep -q -v '\.' "$outputFile"; then + if ! grep -qvE '\.|server:' "$outputFile"; then output_ok else json add warning 'warningSanityCheckTLD' "$outputFile" @@ -1985,7 +1985,7 @@ adb_check_tld() { output "No block-list ('$outputFile') found.\n" return 0 fi - c="$(grep -c -v '\.' "$outputFile")" + c="$(grep -cvE '\.|server:' "$outputFile")" if [ "$c" -gt 0 ]; then if [ "$c" -eq 1 ]; then output 1 "Found 1 match for TLD in '$outputFile'.\n" @@ -1995,7 +1995,7 @@ adb_check_tld() { output 2 "[PROC] Found $c matches for TLDs in '$outputFile'.\n" fi if [ "$c" -le 20 ]; then - grep -v '\.' "$outputFile" | sed "$outputOutputFilter" + grep -vE '\.|server:' "$outputFile" | sed "$outputOutputFilter" fi else output 1 "No TLD was found in current block-list ('$outputFile').\n" -- 2.30.2